#include <iostream>
#include <stdlib.h>
#include <cstring>
using namespace std;
int main()
{
	long long a,b;
	while(cin>>a>>b){
		int s1[20],s2[20];
		int result[20];
		memset(result,0,sizeof(result));
		memset(s1,0,sizeof(s1));
		memset(s2,0,sizeof(s2));
		result[0]=0;
		if(a==0&&b==0) break;
		int jishu1=1;
		int jishu2=1;
		while(a>0){
			s1[jishu1]=a%10;
			a/=10;
			jishu1++;
		}
		while(b>0){
			s2[jishu2]=b%10;
			b/=10;
			jishu2++;
		}
		int i,j;
		i=jishu1-1;
		j=jishu2-1;
		int position;
		int le;
		
		position=i>j?i:j;
		le=position;
		while(position>0){
			result[position]=s1[i]+s2[j]+result[position];
			if(result[position]>=10){
				result[position-1]=1;
				result[position]=result[position]%10;
				position--;
				i--;
				j--;
				
			}
			else{
				position--;
				i--;
				j--;
			}
			if(i<0) i=0;
			if(j<0) j=0;
		}
		int pp=0;
		while(result[pp]==0){
			pp++;
		}
		for(;pp<=le;pp++){
			cout<<result[pp];
		}
		cout<<endl;
	}
}
